package gobelinmaker.client;

import com.sun.scenario.scenegraph.SGShape;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;

/**
 * Fonalszakasz alaposztálya.
 *
 * @author imruf84
 */
public class WoolSegmentBase extends SGShape {

    /**
     * Rajzobjektum.
     */
    private final BasicStroke bs;

    /**
     * Síkidom létrehozása.
     *
     * @param bs rajzobjektum
     * @param c szín
     * @param from honnan
     * @param to hová
     */
    public WoolSegmentBase(BasicStroke bs, Color c, Point2D from, Point2D to) {
        this.bs = bs;
        this.setShape(this.bs.createStrokedShape(new Line2D.Double(from, to)));
        this.setFillPaint(c);
        this.setAntialiasingHint(RenderingProperties.ANTIALIASING);
    }

    /**
     * Rajzobjektum lekérdezése.
     *
     * @return rajzobjektum
     */
    public BasicStroke getBasicStroke() {
        return this.bs;
    }
}
